<?php
function logged_in_redirect(){
    if(logged_in()=== true){
        header('Location:index.php');
        exit();
    }
    
}
function protect_page(){
    if(logged_in()=== false){
        header('Location:protected.php');
        exit();
    }
    
}
function sanitize($data){
    return mysql_escape_string($data);
}
function output_errors($errors){
    return '<li>' . implode (' </li><br><li>', $errors) . '</li><br>';
    
}

?>